package com.yunxi.service.localService.impl.sto;

import com.github.pagehelper.PageInfo;
import com.yunxi.core.page.PageHelperPlus;
import com.yunxi.sto.pojo.ReportPartnerYearVO;
import com.yunxi.sto.pojo.YearReportVO;
import org.springframework.stereotype.Service;
import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.dao.sto.ReportPartnerYearMapper;
import com.yunxi.model.sto.ReportPartnerYear;
import com.yunxi.service.localService.sto.ReportPartnerYearService;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Guan
 * @since 2020-03-09
 */
@Service
public class ReportPartnerYearServiceImpl extends ServiceImplPlus<ReportPartnerYearMapper, ReportPartnerYear> implements ReportPartnerYearService {

    @Override
    public Long getByReportDate(String curYear) {
        return baseMapper.getByReportDate(curYear);
    }

    @Override
    public PageInfo<YearReportVO> yearList3(ReportPartnerYearVO reportPartnerYear,Integer pageNum,Integer pageSize) {
        PageHelperPlus.startPage(pageNum,pageSize);
        List<YearReportVO> list = baseMapper.yearList3(reportPartnerYear);
        PageInfo<YearReportVO> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }
}
